import { ref, onMounted } from "vue"
import {getBannerImg} from "@/api/home.js"


export const useBanner = () => {
  const bannerList = ref([])
  const getBannerList = async () => {
    const res = await getBannerImg('2')
    bannerList.value = res.result
  }

  onMounted(() => {
    getBannerList()
  })

  return {
    bannerList,
    getBannerList,
  }
}
